package com.example.common.enums;

public enum ReturnCodeEnum {

    SUCCESS(200, "正常返回"),
    UPSTAGE(101, "升级"),
    FAILURE(202, "接口错误"),
    PARAMS_ERROR(400, "参数错误"),
    UNAUTHORIZED(401, "没有权限"),
    FORBIDDEN(403, "禁止访问"),
    NOT_FOUND(404, "找不到"),
    PASSWORD_ERROR(405, "密码错误"),
    LARGE_FILE(413, "文件太大"),
    SERVER_ERROR(500, "服务器错误"),
    LOGIN_TIMEOUT(-1, "登录超时"),
    WECHAT_LOGIN(10, "微信登录"),
    REPEAT_OPERATE(11, "重复操作"),
    NOT_LOGIN(403,"用户未登录"),
    VERIFY_SUCCESS(200,"登录验证成功"),
    VERIFY_FAILED(400,"登录验证失败"),
    LOGOUT_SUCCESS(2002,"注销成功"),
    USER_ACCOUNT_USE_BY_OTHERS(401,"您的账号已经被另一台机器登录，您被迫下线");

    private int code;
    private String msg;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    private ReturnCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
